<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.lang.Exception" %>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>系统-登录</title>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<link type="text/css" rel="stylesheet" href="<s:url value='/theme/default/css/content.css'/>" />
		<link type="text/css" rel="stylesheet" href="<s:url value='/theme/common/login.css'/>" />
		<link type="text/css" rel="stylesheet" href="<s:url value='/js/plugin/alert/jquery.alerts.css'/>"></link>
		<link rel="stylesheet" href="<s:url value='/js/plugin/validator/css/screen.css'/>" type="text/css">
		<link rel="stylesheet" href="<s:url value='/js/plugin/validator/css/styleLogin.css'/>" type="text/css">
		<script type="text/javascript" src="<s:url value='/js/jquery-1.9.1.min.js'/>"></script>
		<script type="text/javascript" src="<s:url value='/js/util.js'/>"></script>
		<script src="<s:url value='/js/MD5.js'/>" type="text/javascript"></script>
		<script src="<s:url value='/js/login.js'/>" type="text/javascript"></script>
		<script type="text/javascript" src="<s:url value='/js/plugin/alert/jquery.alerts.js'/>"></script>
		<!-- validator -->
		<script type="text/javascript" src="<s:url value='/js/plugin/metadata/jquery.metadata.js'/>"></script>
		<script type="text/javascript" src="<s:url value='/js/plugin/validator/jquery.validate.js'/>"></script>
		<script>
			$(function(){
				loginPosition();
				$("#userName").focus();
			})
			function loginPosition(){
				
				var obj = $("#userName");
				var offset = $("#userName").offset();
				$(".serverErrorContainer").css({left:offset.left - 68 + "px", top:offset.top - obj.outerHeight() - 50 + "px"});
			}
			$(window).resize(function(){loginPosition()});
			$(document).ready(function(){
				var errMess = $('#errorDivText').html();
				if(errMess==null || errMess=='' || $(".errorMessage").html().trim() == ""){
				}
				else{
					var errorContent = $($(errMess).find("span")[0]).html();
					$.validator.serverErrorFun($("div.serverError"),errorContent);
				}
			})
		</script>
		<!--[if IE 6]> 
		<script type="text/javascript" src="script/plugins/fixpng/DD_belatedPNG_0.0.8a.js"></script>
		<script>
		DD_belatedPNG.fix('#login_bg,#login_pic');
		</script>
		<![endif]--> 
		<style>
			#userName{width:96px;padding:0px;height:20px;border:0px;}
			#password{width:96px;padding:0px;height:20px;border:0px;}
		</style>
	</head>
<%
if(request.getSession()!=null) {
	try {
		request.getSession().invalidate();//清空session
	} catch(Exception e){}
	request.getSession(true);
}
if(request.getCookies()!=null && request.getCookies().length>0) {
	Cookie cookie = request.getCookies()[0];//获取cookie
	cookie.setMaxAge(0);//让cookie过期
}
%>
<body style="overflow-x:hidden;overflow-y:hidden">

<div id="errorDivText" style="display:none;"><s:actionerror/></div>
<%--<img id="bg" src="<s:url value='/theme/common/images/login/background.jpg'/>" width="100%" height="100%" style="right: 0; bottom: 0;  position: absolute; top: 0px; left: 0;" />
<!--jquery validator显示错误信息的容器 -->--%>
<div class="serverErrorContainer" style="position:absolute;width:260px;left:580px;top:84px;z-index:1">
<div class="serverError">
	<ol>

	</ol>
</div>
<div class="container">
	<div id="handleDiv_child" class="errorDIv" divAttend="attend">
		<ol>
		</ol>
	</div>
</div>
</div>
<!-- end -->
<form id="form1" method="post" action="<s:url value='/login'/>">
<div id="login_bg" align="center" style="overflow-x:hidden;overflow-y:hidden">
	<div class="chinaMobile"></div>
	<div id="login_pic" align="left">
		
	</div>
	<div class="loginform">
			<!--用户名-->
			<div id="user">
			<label>用户名:</label>
				<s:textfield name="userName" id="userName" maxlength="50"
											onkeypress="if(event.keyCode==13){Javascript: login(); return false;}"></s:textfield>
			
			<label>&emsp;&emsp;密&emsp;码:</label>
			<s:password name="password" id="password" maxlength="50"
											onkeypress="if(event.keyCode==13){Javascript: login(); return false;}"></s:password>
			
			</div>
			<div class="buttonContainer"> <a  onclick="login(); return false;" href="#" class="button"></a></div>
			<!--密码-->
			<!--提交按钮-->
			<div id="but">
				
				<%--<a href="#" class="button"><input id="btnReset" type="button" value="重置" onclick="resetLogin(); return false;"></a>
			--%></div>
		</div>
</div>
<div class="copyright">中国移动通信版权所有</div>
</form>
</body>
</html>
